/* 全局样式 */
body {
    font-family: 'SF Pro Display', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
    font-size: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    width: 100%;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 20px auto; /* 确保容器在页面中居中 */
}

/* 状态栏样式 */
.status-bar {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: #333;
    color: white;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    font-size: 14px;
}

/* 文章标题样式 */
.article-header {
    text-align: center;
    margin-bottom: 20px;
    padding-top: 60px; /* 为状态栏留出空间 */
}

.article-header h1 {
    font-size: 2.5rem;
    color: #0078d7;
    margin: 0;
}

.article-header p {
    font-size: 14px;
    color: #666;
    margin: 10px 0 0;
}

/* 文章图片样式 */
.article-image {
    max-width: 100%; /* 确保图片宽度不超过容器 */
    height: auto; /* 自动调整高度以保持宽高比 */
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.article-image:hover {
    transform: scale(1.02);
}

/* 文章内容样式 */
.article-content {
    font-size: 16px;
    margin-bottom: 40px;
}

.article-content p {
    margin: 0 0 15px;
}

/* 评论区样式 */
.comment-section {
    margin-top: 40px;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

.comment-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #0078d7;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-item {
    background: #f9f9f9;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.comment-author {
    font-weight: bold;
    color: #0078d7;
    margin-bottom: 5px;
}

.comment-date {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* 添加评论表单样式 */
#addCommentForm {
    margin-top: 20px;
}

#addCommentForm label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#addCommentForm input, #addCommentForm textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
}

#addCommentForm button {
    padding: 10px 20px;
    background-color: #0078d7;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

#addCommentForm button:hover {
    background-color: #0056b3;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 15px;
    }

    .article-header h1 {
        font-size: 2rem;
    }

    .comment-section h2 {
        font-size: 1.6rem;
    }

    #addCommentForm input, #addCommentForm textarea {
        padding: 8px;
        font-size: 12px;
    }

    #addCommentForm button {
        padding: 8px 15px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .status-bar {
        flex-direction: column;
        align-items: center;
    }

    .status-bar span {
        margin: 5px 0;
    }

    .article-header h1 {
        font-size: 1.8rem;
    }

    .comment-section h2 {
        font-size: 1.4rem;
    }

    #addCommentForm input, #addCommentForm textarea {
        padding: 6px;
        font-size: 10px;
    }

    #addCommentForm button {
        padding: 6px 10px;
        font-size: 10px;
    }
}
